﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WeiDuan.Model;
using B2B.Business;

namespace B2B.Service
{
    public interface IProductClassService
    {
      


        /// <summary>
        /// 创建一个分类
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        string AddClass(ClassAddRequest req, UserInfo user);

        /// <summary>
        /// 修改一个分类
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        void UpdateClass(ClassUpdateRequest req, UserInfo user);

        /// <summary>
        /// 逻辑删除一个分类
        /// </summary>
        /// <param name="id"></param>
        /// <param name="user"></param>
        void RemoveClass(string id, UserInfo user);

        /// <summary>
        /// 对分类进行排序
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        void ChangeClassSort(List<ObjectSort> req, UserInfo user);

        /// <summary>
        /// 查询所有分类
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        List<ClassInfo> QueryClass(UserInfo user);

        /// <summary>
        /// 查询所有分类，按层级结构化处理
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        List<ClassInfo> QueryClassStru(UserInfo user);

        /// <summary>
        /// 查询指定父类下的子类
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        List<ClassInfo> QueryChildClass(string parentId, UserInfo user);

        /// <summary>
        /// 查询指定父类下的子类，按层级结构化处理
        /// </summary>
        /// <param name="parentId"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        List<ClassInfo> QueryChildClassStru(string parentId, UserInfo user);

        /// <summary>
        /// 添加类别属性
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        string AddClassAttr(ClassAttrAddRequest req, UserInfo user);

        /// <summary>
        /// 修改类别属性
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        void UpdateClassAttr(ClassAttrUpdateRequest req, UserInfo user);

        /// <summary>
        /// 删除类别属性
        /// </summary>
        /// <param name="id"></param>
        /// <param name="user"></param>
        void RemoveClassAttr(string id, UserInfo user);

        /// <summary>
        /// 类别属性排序
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        void ChangeClassAttrSort(List<ObjectSort> req, UserInfo user);

        /// <summary>
        /// 按类别ID查询类别属性
        /// </summary>
        /// <param name="id"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        List<ClassAttrInfo> QueryClassAttr(string id, UserInfo user);

        /// <summary>
        /// 添加类别属性值
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        string AddClassAttrValue(ClassAttrValueAddRequest req, UserInfo user);

        /// <summary>
        /// 修改类别属性值
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        void UpdateClassAttrValue(ClassAttrValueUpdateRequest req, UserInfo user);

        /// <summary>
        /// 删除类别属性值
        /// </summary>
        /// <param name="classId"></param>
        /// <param name="user"></param>
        void RemoveClassAttrValue(string classId, UserInfo user);

        /// <summary>
        /// 类别属性值排序
        /// </summary>
        /// <param name="req"></param>
        /// <param name="user"></param>
        void ChangeClassAttrValueSort(List<ObjectSort> req, UserInfo user);

        /// <summary>
        /// 查询类别属性值
        /// </summary>
        /// <param name="attrId"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        List<ClassAttrValueInfo> QueryClassAttrValue(string attrId, UserInfo user);


        string AddBrand(BrandAddRequest req, UserInfo user);

        void UpdateBrand(BrandUpdateRequest req, UserInfo user);

        void RemoveBrand(string id, UserInfo user);

        List<BrandInfo> QueryBrandByClass(string id, UserInfo user);
    }
}
